package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.model.album.BaseCategory3;
import com.atguigu.tingshu.model.album.BaseCategoryView;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 专辑数据查询的Feign接口
 *
 * @author Taeyang
 * @date 2025/4/28
 */
@FeignClient(name = "service-album", path = "/client/album/category", contextId = "BaseCategoryViewFeignClient")
public interface BaseCategoryViewFeignClient {

    /**
     * 根据专辑三级分类id从分类视图中查询专辑的分类列表
     *
     * @param category3Id
     * @return
     */
    @GetMapping("/getBseCategoryView/{category3Id}")
    public BaseCategoryView getBseCategoryView(@PathVariable("category3Id") Long category3Id);

    /**
     * 根据一级分类id查询所有的二级分类和三级分类
     *
     * @param category1Id
     * @return
     */
    @GetMapping("/findTopBaseCategory3/{category1Id}")
    public List<BaseCategory3> findTopBaseCategory3(@PathVariable("category1Id") Long category1Id);
}
